<?php

namespace App\Http\Requests\Api\v1\User;

use App\Http\Requests\Api\BaseRequest;

class RegisterRequest extends BaseRequest
{

    public function rules()
    {
        return [
            'email' => 'bail|required|email|unique:users|',
            'password' => 'required'
        ];
    }

    public function messages()
    {
        return [
            'email.unique' => '邮箱已经注册',
            'email.required' => '用户名不能为空',
            'email.email' => '邮箱格式不正确',
            'password.required' => '密码不能为空',
        ];
    }
}
